<html><head><meta charset="gb2312"/><title>Ftp.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Ftp example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<font color="#3A3966">InitNetwork</font>()

<b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenFTP</font>(0, "127.0.0.1", "test", "test", 0)

  Result =<font color="#3A3966"> SendFTPFile</font>(0,<font color="#3A3966"> OpenFileRequester</font>("Choose a file to send", "", "*.*", 0), "purebasic_sent.file", 1)
  
  <b><font color="#3A3966">Repeat</font></b>
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">FTPProgress</font>(0)
<font color="#3A3966">    Delay</font>(300)
  <b><font color="#3A3966">Until</font></b> <font color="#3A3966">FTPProgress</font>(0) = -3 <b><font color="#3A3966">Or</font></b> <font color="#3A3966">FTPProgress</font>(0) = -2

  <b><font color="#3A3966">Debug</font></b> "finished"
  
<b><font color="#3A3966">Else</font></b>
<font color="#3A3966">  MessageRequester</font>("Error", "Can't connect to the FTP server")
<b><font color="#3A3966">EndIf</font></b>
</font></pre>
</body></html>
